﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.Model;
using Automobile.service.DAL;
using System.Data;

namespace Automobile.service.BLL
{
    public class WareHoseBLL
    {
        WareHoseDAL dal = new WareHoseDAL();
        /// <summary>
        /// 仓库管理——显示
        /// </summary>
        /// <returns></returns>
        public DataTable ShowListWareHose()
        {
            return dal.ShowListWareHose();
        }
        /// <summary>
        /// 仓库管理——获取总行数
        /// </summary>
        /// <returns></returns>
        public int GetWareHoseCount()
        {
            return dal.GetWareHoseCount();
        }
        /// <summary>
        /// 仓库管理——添加
        /// </summary>
        /// <param name="w"></param>
        /// <returns></returns>
        public int AddWareHose(WareHose w)
        {
            return dal.AddWareHose(w);
        }
        /// <summary>
        /// 仓库管理——删除支持多删
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelWareHose(string id)
        {
            return dal.DelWareHose(id);
        }
        /// <summary>
        /// 仓库管理——根据仓库名称搜索
        /// </summary>
        /// <param name="wname"></param>
        /// <returns></returns>
        public DataTable GetWareHoseByName(string wname)
        {
            return dal.GetWareHoseByName(wname);
        }
        /// <summary>
        /// 仓库管理——根据编号获取信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DataTable GetWareHoseByid(int id)
        {
            return dal.GetWareHoseByid(id);
        }
        /// <summary>
        /// 仓库管理——修改仓库信息
        /// </summary>
        /// <param name="w"></param>
        /// <returns></returns>
        public int UpdWareHose(WareHose w)
        {
            return dal.UpdWareHose(w);
        }
    }
}
